<%@ include file="/WEB-INF/controllers/configuration/includes.jsp"%>
<tiles:useAttribute id="idPagina" name="idPagina" ignore="true" scope="request"/>
<title><tiles:useAttribute id="keyTitulo" name="titulo" /> <spring:message code="${keyTitulo}" /></title>
<link href="<c:url value="/img/faviconLSI.ico"/>" type="image/x-icon" rel="shortcut icon" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta name="viewport" content="width=device-width,initial-scale=1">

<!-- <meta name="viewport" content="width=device-width; initial-scale=1.0"> -->
<%-- <link rel="stylesheet" type="text/css" href="<c:url value="/css/main.css"/>" /> --%>
<!-- Importados desde el main -->

<link rel="stylesheet" href="<c:url value="/js/nyroModal/styles/nyroModal.css"/>" type="text/css" media="screen" />
<link rel="stylesheet" type="text/css" href="<c:url value="/css/navigationBar.css"/>" />
<link rel="stylesheet" type="text/css" href="<c:url value="/css/formularios.css"/>" />
<link rel="stylesheet" type="text/css" href="<c:url value="/css/sistemas/jQuery-ui/jquery-ui.css"/>" />
<link rel="stylesheet" type="text/css" href="<c:url value="/css/sistemas/jquery.selectbox.css"/>" />
<%-- <link rel="stylesheet" type="text/css" href="<c:url value="/css/style_Normal.css"/>" />
<link rel="stylesheet" type="text/css" href="<c:url value="/css/style_Small.css"/>" /> --%>
<!--[if IE 6]>
	<script type="text/javascript" src="<c:url value="/js/nyroModal/js/jquery.nyroModal-ie6.min.js"/>"></script>
<![endif]-->
<%-- <script type="text/javascript" src="<c:url value="/js/util/util.js"/>"></script> --%>

<!--  -->
<link rel="stylesheet" type="text/css" href="<c:url value="/css/sistemas/calendar-system.css"/>" />

<link rel='stylesheet' type='text/css' href='<c:url value='/css/lessframework4.css'/>' />
<link rel='stylesheet' type='text/css' href='<c:url value='/css/reset.css'/>' />
<link rel='stylesheet' type='text/css' href='<c:url value='/css/base.css'/>' />
<link rel='stylesheet' type='text/css' href='<c:url value='/css/list_table.css'/>' />

<script type="text/javascript">
// 	if(jQuery.browser.mobile == false) {
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/lessframework4.css'/>' />");
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/reset.css'/>' />");
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/base.css'/>' />");
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/list_table.css'/>' />");
// 	}
// 	else {
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/lessframework4Mobile.css'/>' />");
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/resetMobile.css'/>' />");
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/baseMobile.css'/>' />");
// 		$('head').append("<link rel='stylesheet' type='text/css' href='<c:url value='/css/list_tableMobile.css'/>' />");
// 	}
</script>


<%-- <script type="text/javascript" src="<c:url value="/js/jQuery/jquery-1.8.0.min.js"/>"></script> --%>

<script type="text/javascript" src="<c:url value="/js/jQuery/jquery-1.8.2.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/util/util.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jQuery/jquery-ui-1.9.1.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/nyroModal/js/jquery.nyroModal.custom.js"/>"></script>
<script type="text/javascript" src="<c:url value="/js/jQuery/jquery.cookie.js"/>"></script>


<script type="text/javascript" src="<c:url value='/js/util/checbox.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/util/navigationbar.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/combobox/jquery.selectbox-0.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/respond/respond.min.js'/>"></script>

<script type="text/javascript">
				jQuery(function($) {
                       $.datepicker.regional['es'] = {
                               closeText : 'Cerrar',
                               prevText : '<Ant',
                     		   nextText: 'Sig>',
                               currentText : 'Hoy',
                               monthNames : [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ],
                               monthNamesShort : [ 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic' ],
                               dayNames : [ 'Domingo', 'Lunes', 'Martes', 'Mi�rcoles', 'Jueves', 'Viernes', 'S�bado' ],
                               dayNamesShort : [ 'Dom', 'Lun', 'Mar', 'Mi�', 'Juv', 'Vie', 'S�b' ],
                               dayNamesMin : [ 'Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa' ],
                               weekHeader : 'Sm',
                               dateFormat : 'dd/mm/yy',
                               firstDay : 1,
                               isRTL : false,
                               showMonthAfterYear : false,
                               yearSuffix : ''
                       };
                       $.datepicker.setDefaults($.datepicker.regional['es']);
               });
       </script>
<!-- Comprobar si existe una pagina en caso de que sea un listado -->
<c:set var="pagActual" value="" />

<c:choose>
	<c:when test="${!empty modelo.pagina}">
		<c:set var="pagActual" value="${modelo.pagina}" />
	</c:when>
	<c:when test="${!empty param.pagina}">
		<c:set var="pagActual" value="${param.pagina}" />
	</c:when>
	<c:when test="${!empty param.paginaAtras}">
		<c:set var="pagActual" value="${param.paginaAtras}" />
	</c:when>
	<c:otherwise>
		<c:set var="pagActual" value="1" />
	</c:otherwise>
</c:choose>


<script type="text/javascript">
	$(document).ready(function() {
		$('#idiomas').hide();
		$('#logo').bind('click',function(){
			window.location.href = '<c:url value="/privado/inicio.do"/>';
		});
		seleccionNiveles("<tiles:insertAttribute  name='idMenu1' ignore='true' />", "<tiles:insertAttribute  name='idMenu2' ignore='true' />");
		generaTituloGestion("<tiles:insertAttribute  name='idMenu1' ignore='true' />", "<tiles:insertAttribute  name='idMenu2' ignore='true' />");
		//Para mantener siempre el n�mero de la paginaci�n cuando se vuelva atr�s
		$("form").append('<input id="campoOcultoPaginaAtras" type="hidden" name="paginaAtras" value="${pagActual}">');

		//Para los combobox
		$("select:not(.debug)").selectbox();

		$("#content").css("min-height", $("#contentDerechaContainer").outerHeight());
	});
</script>

<c:if test="${!empty idPagina}">
	<c:choose>
		<c:when test="${idPagina == 'inicio'}">			
			<script type="text/javascript" src="<c:url value="/js/jshash-2.2/sha1-min.js"/>"></script>
			<link rel="stylesheet" type="text/css" href="<c:url value="/css/login/login.css"/>" />				
		</c:when>
		<c:when test="${idPagina == 'inicioPriv'}">			
			<%@ include file="/WEB-INF/controllers/privado/inicio/inicioHI.jsp"%>		
		</c:when>							
		<c:when test="${idPagina == 'login'}">
			<script type="text/javascript" src="<c:url value="/js/jshash-2.2/sha1-min.js"/>"></script>
			<link rel="stylesheet" type="text/css" href="<c:url value="/css/login/login.css"/>" />
			
		</c:when>
		<c:when test="${idPagina == 'listUser'}">
			<%@ include file="/WEB-INF/controllers/privado/usuarios/listUserHI.jsp"%>
			
		</c:when>
		<c:when test="${idPagina == 'formUser'}">
			
			<%@ include file="/WEB-INF/controllers/privado/usuarios/formUserHI.jsp"%>
		</c:when>
		<c:when test="${idPagina == 'listado'}">
			<link rel="stylesheet" type="text/css" href="<c:url value="/js/flexigrid/css/flexigrid.css"/>" />
			<link rel="stylesheet" type="text/css" href="<c:url value="/js/flexigrid/css/flexigridText.css"/>" />
			<script type="text/javascript" src="<c:url value="/js/flexigrid/flexigrid.js"/>"></script>
		</c:when>
		<c:when test="${idPagina == 'graficaTweets' }]">
			<script type="text/javascript" src="<c:url value="/js/util/paginacion.js"/>"></script>
			<link rel="stylesheet" type="text/css" href="<c:url value="/css/sistemas/paginacion.css"/>" />
			<%@ include file="/WEB-INF/controllers/configuration/mensajesPaginacion.jsp"%>
		</c:when>
		<c:when test="${idPagina == 'timeline' }]">
			<script type="text/javascript" src="<c:url value="/js/util/paginacion.js"/>"></script>
			<link rel="stylesheet" type="text/css" href="<c:url value="/css/sistemas/paginacion.css"/>" />
			<%@ include file="/WEB-INF/controllers/configuration/mensajesPaginacion.jsp"%>
		</c:when>
		<c:when test="${idPagina == 'search' }">
			
		</c:when>
	</c:choose>
</c:if>